//
//  NavBarAppDelegate.m
//  NavBar
//
//  Created by Thiago on 23/07/2009.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import "NavBarAppDelegate.h"

@implementation NavBarAppDelegate

@synthesize window, mainController;


- (void)applicationDidFinishLaunching:(UIApplication *)application {    

	// Main view controller containing the web view
	self.mainController = [[NavBarViewController alloc] init];
	
	//Navigation controller for the NavBar
	UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:mainController];
	
	CGRect screenBounds = [[UIScreen mainScreen] bounds];
	self.window = [[[ UIWindow alloc] initWithFrame: screenBounds] autorelease];
	
	// add the navigation controller's view to the window
    [window addSubview:navController.view];
    [window makeKeyAndVisible];

}


- (void)dealloc {
	[mainController release];
    [window release];
    [super dealloc];
}


@end
